
package com.liwt.offer.chapter2;

/**
 * 树的节点对象
 * 
 * @author likebamboo
 */
public class TreeNode {
    /**
     * 值
     */
    private int mValue = 0;

    /**
     * 左子树
     */
    private TreeNode mLeftNode = null;

    /**
     * 右子树
     */
    private TreeNode mRightNode = null;

    public TreeNode() {

    }

    public int getValue() {
        return mValue;
    }

    public void setValue(int value) {
        this.mValue = value;
    }

    public TreeNode getLeftNode() {
        return mLeftNode;
    }

    public void setLeftNode(TreeNode leftNode) {
        this.mLeftNode = leftNode;
    }

    public TreeNode getRightNode() {
        return mRightNode;
    }

    public void setRightNode(TreeNode rightNode) {
        this.mRightNode = rightNode;
    }

    @Override
    public String toString() {
        return "TreeNode [mValue=" + mValue + ", mLeftNode=" + mLeftNode + ", mRightNode="
                + mRightNode + "]";
    }

}
